// Aufgabe_11_2_Puppe

var bild;

function preload(){
  bild = loadImage("puppe.jpg");
}

function setup(){
  createCanvas(800, 800);
}

function draw(){
  translate(width/2, height/2);

// Startwerte für die Lage und Größe des Bildes
	//  x     y    b    h
  quadrat(-400, -400, 800, 800);
}

function quadrat(x, y, b, h){
  image(bild, x, y, b, h);
  if (b > 1){ // Verhinderung einer Endlosschleife
    quadrat(x/2+10, y/2+58.5, b/2, h/2);
  }
}
